package entity;

public class Teacher extends Person {
    private Course teachingCourse;

    public Teacher(String id, String name, String gender, Course teachingCourse) {
        super(id, name, gender);
        this.teachingCourse = teachingCourse;
    }

    public void openCourse() {
        System.out.println("教师" + name + "开启课程" + teachingCourse.getCourseName() + "的授课");
    }

  
    public void printSchedule() {
        if (teachingCourse == null) {
            System.out.println("教师" + name + "暂无授课课程");
        } else {
            System.out.println("教师课表：\n课程编号：" + teachingCourse.getCourseId() + 
                               "\n课程名称：" + teachingCourse.getCourseName() + 
                               "\n上课地点：" + teachingCourse.getClassroom() + 
                               "\n时间：" + teachingCourse.getTime());
        }
    }

    public Course getTeachingCourse() {
        return teachingCourse;
    }
}